﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Microsoft.Practices.Unity;

namespace ERPStore.Web.Start
{
	public class ValidationConfig
	{
		public static void Register(Microsoft.Practices.Unity.IUnityContainer container)
		{
			if (!container.IsRegistered<ERPStore.Services.IValidatorService>())
			{
				throw new Exception("ERPStore.Services.IValidatorService does not configured, you could use unity.config for declaration");
			}
			var validatorService = container.Resolve<ERPStore.Services.IValidatorService>();
			validatorService.Configure();

		}

	}
}
